<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.ResultSet"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%

String id = request.getParameter("id");

System.out.println(id);


if(id != ""){
	
	System.out.println("if문 진입");

	Class.forName("oracle.jdbc.driver.OracleDriver"); 
	String url = "jdbc:oracle:thin:@127.0.0.1:1521:XE"; 
	String user = "student";			
	String password = "1234";	
	Connection conn = null;
	PreparedStatement pstmt= null;
	ResultSet rs = null;
	
	conn = DriverManager.getConnection(url,user,password);
	
	String sql="select id from Tmall_Member where id= ? ";
	pstmt = conn.prepareStatement(sql);
	pstmt.setString(1, id);
	
	System.out.println(id);
	
	rs = pstmt.executeQuery();
	int re = pstmt.executeUpdate();
	System.out.println(re);
	
		out.println("<rs>");
	if(re==1){
		out.println("<result>");
		out.println( "<re>"+re+"</re>"   );
		out.println("</result>");
		out.println("</rs>");
		
		out.println("<rs>");
	}else{
		out.println("<result>");
		out.println( "<re>"+re+"</re>"   );
		out.println("</result>");
		out.println("</rs>");
	}

}


%>